-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Java: Add support to Compact Source Files #20116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: idrissrio/java-upgrade-fix
Are you sure you want to change the base?
Java: Add support to Compact Source Files #20116
Conversation
05f6811
to
66b5755
Compare
6aac6ea
to
246bbd4
Compare
java/downgrades/9f6026c400996c13842974b24f076a486ad1f69c/compilationUnit.ql
Fixed
Show fixed
Hide fixed
a5c64a6
to
c9885d5
Compare
56cd9e7
to
ac52a1b
Compare
7e04c2b
to
5a80595
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for Java 25 compact source files (JEP 512) by introducing two new predicates: Class.isImplicit()
to identify implicitly declared classes and CompilationUnit.isCompactSourceFile()
to identify compilation units containing compact source files.
- Added database schema support with new
isImplicitClass
table - Implemented library predicates for detecting compact source files and implicit classes
- Created comprehensive test suite with multiple query examples
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
java/ql/lib/config/semmlecode.dbscheme | Added isImplicitClass table definition for tracking implicit classes |
java/ql/lib/semmle/code/java/Type.qll | Added Class.isImplicit() predicate to detect implicit classes |
java/ql/lib/semmle/code/java/CompilationUnit.qll | Added CompilationUnit.isCompactSourceFile() predicate |
java/ql/lib/upgrades/*/semmlecode.dbscheme | Database upgrade schema adding isImplicitClass table |
java/ql/lib/upgrades/*/old.dbscheme | Previous database schema for comparison |
java/downgrades/*/semmlecode.dbscheme | Database downgrade schema removing isImplicitClass table |
java/downgrades/*/old.dbscheme | Previous schema for downgrade comparison |
java/ql/test/library-tests/compact-source-files/* | Test files demonstrating compact source file functionality |
java/ql/lib/change-notes/2025-07-23-compact-source-files.md | Release notes documenting the new feature |
5a80595
to
cd80877
Compare
92f7afa
to
e0b9549
Compare
e0b9549
to
6247034
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (when the internal PR is approved as well).
This PR adds support to compact source files (JEP 512).
It adds 2 new predicates
Class.isImplicit
andCompilationUnit.isCompactedSourceFile
.See internal PR for more info.